package com.qkl.xiatang.app.service.redis;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class LockService {

    @Autowired
    private RedisService redisService;


    public boolean lockJobs(String key, String value){
        return this.lock(key,value,60 * 1000);
    }

    public boolean lock(String key, String value, long timeout) {
        //return true;
        return redisService.lock(key,value,timeout);
    }

    public boolean releaseLock(String key, String value) {
        //return true;
        return redisService.releaseLock(key,value);
    }

}
